package com.kejiguan.ui.response;

import com.google.gson.annotations.Expose;
import com.kejiguan.ui.model.ExhibitionNeItem;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by YYY on 16/7/18.
 */
public class QueryUnActivationExhibitionResponse extends BaseResponse {

    @Expose
    private List<ExhibitionNeItem> exhibitionList;

    private List<ExhibitionNeItem> unActivationList;

    public List<ExhibitionNeItem> getExhibitionList() {
        return exhibitionList;
    }

    public void setExhibitionList(List<ExhibitionNeItem> exhibitionList) {
        this.exhibitionList = exhibitionList;
    }

    public List<ExhibitionNeItem> getUnActivationList() {
        return unActivationList;
    }


    public void initDatas() {
        if (null != exhibitionList) {
            for (ExhibitionNeItem exhibitionNeItem : exhibitionList) {
                if (exhibitionNeItem.getExhibitionState().equals("unusing")) {
                    addToUnActivationList(exhibitionNeItem);
                }
            }
        }
    }


    private void addToUnActivationList(ExhibitionNeItem exhibitionNeItem)
    {
        if (unActivationList==null)
        {
            unActivationList=new ArrayList<>(0);
        }

        unActivationList.add(exhibitionNeItem);
    }
}
